
import java.util.LinkedList;

public class Palindrom {

	public Palindrom(){}
	
	public boolean esPalindrom(String frase){
		String frase2 = "";
		LinkedList<Character> pila=new LinkedList<Character>();
		frase=frase.replace(" ", "");
		for (int i=0;i<frase.length();i++) pila.push(frase.charAt(i));
		while(!pila.isEmpty()) frase2+=pila.pop();
		if (frase.compareToIgnoreCase(frase2)==0) return true;
		else return false;
	}
}
